//package com.anorak.betsy.jdt;
//
//import cn.hutool.core.codec.Base64;
//import ealvatag.tag.vorbiscomment.VorbisCommentFieldKey;
//import org.jaudiotagger.audio.AudioFile;
//import org.jaudiotagger.audio.AudioFileIO;
//import org.jaudiotagger.audio.flac.metadatablock.MetadataBlockDataPicture;
//import org.jaudiotagger.tag.FieldKey;
//import org.jaudiotagger.tag.Tag;
//import org.jaudiotagger.tag.TagField;
//import org.jaudiotagger.tag.flac.FlacTag;
//import org.jaudiotagger.tag.images.Artwork;
//import org.jaudiotagger.tag.images.ArtworkFactory;
//import org.jaudiotagger.tag.images.StandardArtwork;
//
//import java.io.File;
//import java.util.Iterator;
//import java.util.List;
//
//public class Marge {
//    static final String BASE_PATH = "/Users/anorak/Documents/JavaProject/standalone/Akby/musicflit/src/main/java/com/anorak/betsy/jdt/";
//    public static void main(String[] args) throws Exception {
//        try {
//            String filePath = BASE_PATH + "AI00000HI9sT38Ywed.flac";
//            AudioFile audioFile = AudioFileIO.read(new File(filePath));
//            FlacTag tag = (FlacTag) audioFile.getTag();
//            String coverImagePath = BASE_PATH + "T002R300x300M000000jg17x3cKA3S_1.jpg";
//            File ImageFile = new File( coverImagePath);
//            String base64Str = Base64.encode(ImageFile);
//            Iterator tagFieldIterator =  tag.getFields();
//            tag.setField(VorbisCommentFieldKey.METADATA_BLOCK_PICTURE.getFieldName(),base64Str);
//            while(tagFieldIterator.hasNext()){ //若有下一个元素
//                TagField str = (TagField)tagFieldIterator.next(); //获取下一个元素并强转为String类型
//                if ( str.getId().equalsIgnoreCase("METADATA_BLOCK_PICTURE")) {
//                    System.out.println(str);
//                }
//            }
//            String lyrics = "[ti:王招君]\n[ar:任素汐]\n[al:王招君]\n[by:dongmei_karakal]\n[offset:0]\n[00:00.07]王招君 (你看你拉住我的模样) (《寻汉计》电影推广曲) - 任素汐\n[00:03.55]词：任素汐\n[00:04.29]曲：任素汐\n[00:05.00]编曲：刘鑫磊\n[00:05.86]制作人：刘鑫磊\n[00:06.84]吉他：Juno\n[00:07.23]人声录音：刘鑫磊\n[00:08.47]大提琴：孙艺\n[00:09.39]音频编辑：刘鑫磊\n[00:10.34]混音/母带：刘鑫磊\n[00:11.62]营销协力：隋冬雪/尹懋鑫/可可豆/派大星\n[00:13.95]视频编导：江少岚\n[00:15.08]项目统筹：杜思潮\n[00:16.25]项目总监：代诗琪/黄才娟\n[00:17.82]营销推广：银河方舟×麻雀音乐人×欧记音乐\n[00:18.89]发行：百纳娱乐/云海娱乐\n[00:18.90]我多平常\n[00:21.09]\n[00:23.74]我可以推开过往\n[00:26.05]\n[00:27.85]我多能撒谎\n[00:30.44]\n[00:31.65]谁能推开过往\n[00:34.32]\n[00:36.23]局是局的局\n[00:38.87]\n[00:40.21]庄是庄的庄\n[00:42.28]\n[00:43.46]听无常 胡坦荡\n[00:49.27]\n[00:52.44]生是生的生\n[00:55.07]\n[00:56.33]忘是忘的忘\n[00:58.71]\n[00:59.61]不打量 别打量\n[01:05.55]\n[01:08.28]你看花儿多红啊\n[01:10.53]\n[01:12.23]笑话一般 散落地上\n[01:15.14]\n[01:16.07]你看世间朗朗有光照\n[01:19.37]\n[01:20.60]留了树荫送我乘凉\n[01:22.99]\n[01:24.18]你看你拉住我的模样\n[01:27.12]\n[01:28.06]你别慌张 你如此慌张\n[01:31.21]\n[01:32.15]你看十里繁华长街长\n[01:35.73]\n[01:36.66]看满荒唐写纸上\n[01:38.67]\n[01:57.86]有多狂妄\n[01:59.87]\n[02:02.59]敢去走过的地方\n[02:05.51]\n[02:06.31]敢无事一样\n[02:09.41]\n[02:10.68]捡起路过的月亮\n[02:13.84]\n[02:14.89]鱼是鱼的鱼\n[02:16.89]\n[02:18.97]光是光的光\n[02:21.30]\n[02:22.29]都无常 都坦荡\n[02:27.69]\n[02:31.26]生是生的生\n[02:33.13]\n[02:35.25]忘是忘的忘\n[02:37.16]\n[02:38.45]不打量 别打量\n[02:44.31]\n[02:46.92]你看花儿多红啊\n[02:49.56]\n[02:51.04]笑话一般 散落地上\n[02:53.80]\n[02:54.95]你看世间朗朗有光照\n[02:58.18]\n[02:59.46]留了树荫送我乘凉\n[03:01.81]\n[03:02.92]你看你拉住我的模样\n[03:05.97]\n[03:06.94]你别慌张 你如此慌张\n[03:09.91]\n[03:10.95]你看十里繁华长街长\n[03:14.42]\n[03:15.48]看满荒唐写纸上\n[03:17.90]\n[03:19.26]你看花儿多红啊\n[03:21.56]\n[03:23.08]笑话一样 散落地上\n[03:25.95]\n[03:27.26]你看世间朗朗有光照\n[03:30.64]\n[03:31.75]留了树荫送我乘凉\n[03:34.29]\n[03:35.28]你看我盼着你的模样\n[03:39.47]我没假装 我不会假装\n[03:42.19]\n[03:43.26]你看十里繁华长街长\n[03:47.02]\n[03:47.86]看满荒唐写纸上\n[03:51.20]\n[03:53.02]都无常 谁坦荡\n[03:58.69]\n[04:01.08]不打量 别打量";
//            tag.setField(FieldKey.LYRICS, lyrics);
//            audioFile.commit();
//        }catch (Exception e){
//            e.printStackTrace();
//        }
//    }
//}
